package lianxi.function;

import lianxi.bean.PageBean;
import org.apache.flink.api.common.functions.RichMapFunction;
import org.apache.flink.api.common.state.ValueState;
import org.apache.flink.api.common.state.ValueStateDescriptor;
import org.apache.flink.configuration.Configuration;

public class PageBeanMapFunction extends RichMapFunction<String, PageBean> {

    //1.声明变量
    private transient ValueState<String> lastVisitDateState = null;

    @Override
    public void open(Configuration parameters) throws Exception {
        ValueStateDescriptor<String> descriptor = new ValueStateDescriptor<>("last_visit_date", String.class);

        //2.初始化变量
        lastVisitDateState = getRuntimeContext().getState(descriptor);
    }

    @Override
    public PageBean map(String value) throws Exception {


        return null;
    }
}
